package com.lxw.oa.service.serviceImpl;

import com.lxw.oa.mapper.DataOverviewMapper;
import com.lxw.oa.service.DataOverviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service("dataOverviewService")
@Transactional
public class DataOverviewServiceImpl implements DataOverviewService {


    @Autowired
    private DataOverviewMapper dataOverviewMapper;


    @Override
    public List<Map<String, String>> getTableInfo() {
        String sql1=dataOverviewMapper.getTableInfoSql(1);
        List<Map<String, String>> list=dataOverviewMapper.getTableInfo(sql1);
        for(Map<String, String> map:list){
            String table_comment=map.get("table_comment");
            table_comment=table_comment.split(";")[0];
            map.put("table_comment",table_comment);
        }
        return list;
    }
}
